# !/usr/bin/python
# _*_ coding: utf-8 _*_
# @Time : 2021/5/25 11:43 上午
# @Author : liujun
# @File : blog.py
# @desc : 博客
from sqlalchemy import Column, VARCHAR, BIGINT, SMALLINT, DATETIME
from datetime import datetime

from db.base import Base


class BlogSort(Base):
    id = Column(BIGINT, primary_key=True, index=True, comment='主键id')
    name = Column(VARCHAR(20), unique=True, comment='名称')
    seq = Column(SMALLINT, index=True, nullable=True, comment='序号')
    remark = Column(VARCHAR(128), comment='备注')
    state = Column(SMALLINT, comment='状态：1、启用。0、禁用。')
    create_time = Column(DATETIME, default=datetime.now, onupdate=datetime.now, comment='创建时间')
    update_time = Column(DATETIME, default=datetime.now, onupdate=datetime.now, comment='更新时间')
